import time
import os 
1234444445566
33333333333333333333
from package.ViewClass import Views
from package.ControlClass import Control
class Main():
    def __init__(self):
        # 实例化视图对象
        view=Views()
        # 实例化操作控制类
        obj=Control()
        while True:
            # 让用户选择操作
            num=input('请输入您要选择的操作：')
            if num == '1':
                obj.register()
            elif num == '2':
                obj.search()
            elif num == '3':
                obj.save_money()
            elif num == '4':
                obj.withdraw()
            elif num == '5':
                obj.transfer()
            elif num == '6':
                obj.change_density()
            elif num == '7':
                obj.lock_card()
            elif num == '8':
                obj.unlock()
            elif num == '9':
                obj.reset()
            elif num == '0':
                obj.quit()
                time.sleep(2)
                break
            elif num == 'a':
                obj.query_record()
            else:
                print('输出错误，请重新输入！')
                view.showcontrol()
if __name__ == '__main__':
    Main()